﻿using System;
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;

using Model.Components;
using FrameWork;
using FrameWork.Components;
using FrameWork.WebControls;


namespace FrameWork.web.Web
{
    public partial class Info1 : System.Web.UI.Page
    {
        public Int32 IDX = (Int32)Common.sink("IDX", MethodType.Get, 10, 0, DataType.Int);
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                T_WebEntity ut = Model.BusinessFacadeModel.T_WebDisp(IDX);
                if (ut.XIF == "已办结")
                {
                    BusinessFacade.Update_Table_Fileds("T_Web", " LookNum=LookNum+1", string.Format(" ID={0}", IDX));
                    
                    TID_Disp.Text = ut.TID.ToString();

                    TTtle_Disp.Text = ut.TTtle.ToString();
                    TContent_Disp.Text = ut.TContent.ToString();
                    XXian_Disp.Text = ut.XXian.ToString();
                    XXian_Disp0.Text = BusinessFacade.get_table_fileds("T_Web", "LookNum", "ID", IDX.ToString());
                }
                else
                {
                    EventMessage.MessageBox(1, "操作失败", "该投诉尚未办结，不能进行评议!", Icon_Type.Error, "history.back();", UrlType.JavaScript);
                }
                 
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            BusinessFacade.Update_Table_Fileds("T_Web", string.Format("Pevel={0}",DropDownList1.SelectedItem.Value), string.Format(" ID={0}", IDX));
            BusinessFacade.Update_Table_Fileds("T_Web", string.Format("PContent='{0}'", TextBox1.Text), string.Format(" ID={0}", IDX));
            BusinessFacade.Update_Table_Fileds("T_Web", string.Format("PTime=getdate()", TextBox1.Text), string.Format(" ID={0}", IDX));
            Response.Write("<script type='text/javascript'>alert('评议成功！');</script>");
        }
    }
}